<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
function comment_on_pdf ($text , $article_id , $span_id){
    
$con = mysql_connect('localhost', 'root', '');

if (!$con) {
die('Could not connect:' . mysql_error());

} else {
    
mysql_select_db("mydb", $con);
$sQuery = "INSERT INTO Comment(article_id,span_id,text) VALUES ($article_id ,$span_id ,$text)";
$rsResult = mysql_query($sQuery, $conn); 


if (!$rsResult)
{
echo "error" .  mysql_error();

} else 
    {
echo 'one record is added';
    }
}
 

}
?>
